home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Aug 90 / MacApp.Tech$ 8⁄10⁄90 / 1723-Re MemoryMgrProblem-Aug90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.0 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    1164416                         9-Aug-90        08:47PDT
  2.  
  3. From:   PASCOE1                         Pascoe, Geoff
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Re: MemoryMgrProblem
  8.  
  9. Martin,
  10.  
  11. If I understand your problem correctly- i.e., you need toolbox calls to
  12. allocate as permananent memory- then there is already a MacApp routine for you.
  13. It is called "PermAllocation".  Use it like this-
  14.  
  15.  
  16.     VAR
  17.        oldFlag : BOOLEAN;
  18.  
  19.     BEGIN
  20.         oldFlag := PermAllocation(TRUE) { All allocs are counted permanent. }
  21.  
  22.             --- your toolbox calls -----
  23.  
  24.         oldFlag := PermAllocation(oldFlag) { Restore allocation flag }
  25.  
  26.     END;
  27.  
  28. Also, keep in mind that there isn't a special area of memory (address range)
  29. that is permanent or temporary.  Allocations are permanent or temporary only
  30. for the purpose of MacApp tracking how much memory is held in reserve for
  31. really important allocations- like segment loads.
  32.  
  33. Try this first, if it doesn't work you may have some other problem.
  34.  
  35. Hope this helps,
  36. Geoff
  37.  
  38.